import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
type int = number;
//class SBattlefieldOpen
// did
export class SBattlefieldOpen extends IMessageBase {
  constructor(autoreg: Boolean = false) {
    
    super();if (autoreg) {
      MessageManager.instance().regist(this);
    }
    return;
  }

  public /* override */ getType(): int {
    return this._type;
  }

  public /* override */ clone(): IMessageBase {
    return new SBattlefieldOpen();
  }

  public /* override */ __write(arg1: SerializeStream): void {
    arg1.writeDate(this.openDt);
    arg1.writeDate(this.endDt);
    arg1.writeInt(this.level);
    return;
  }

  public /* override */ __read(arg1: SerializeStream): void {
    this.openDt = arg1.readDate();
    this.endDt = arg1.readDate();
    this.level = arg1.readInt();
    return;
  }

  public /* const */ _type: int = 97;

  public /* var */ openDt!: Date;

  public /* var */ endDt!: Date;

  public /* var */ level!: int;

  public static /* var */ _regist: SBattlefieldOpen = new SBattlefieldOpen(
    true
  );
}
